package com.dragon.modules.yuegou.query.park;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.park.StatisticsTotalEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * 停车统计汇总表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2020-03-20 15:40:26
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class StatisticsTotalQuery extends StatisticsTotalEntity implements Query<StatisticsTotalEntity> {

	/** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

	/** 商户id查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

	/** 停车场名称查询条件 */
	@JsonUnwrapped(prefix = "parkingName")
	private Condition<String> parkingNameCondition;

	/** 停车场ID查询条件 */
	@JsonUnwrapped(prefix = "parkingId")
	private Condition<String> parkingIdCondition;

	/** 计算开始时间查询条件 */
	@JsonUnwrapped(prefix = "beginTime")
	private Condition<LocalDateTime> beginTimeCondition;

	/** 计算终止时间查询条件 */
	@JsonUnwrapped(prefix = "endTime")
	private Condition<LocalDateTime> endTimeCondition;

	/** 本时间段结束后还占车位数量查询条件 */
	@JsonUnwrapped(prefix = "occupyNumber")
	private Condition<Integer> occupyNumberCondition;

	/** 时间段内停车总数量查询条件 */
	@JsonUnwrapped(prefix = "totalNumber")
	private Condition<Integer> totalNumberCondition;

	/** 时间段内超出免费数量查询条件 */
	@JsonUnwrapped(prefix = "chargeNumber")
	private Condition<Integer> chargeNumberCondition;

	/** 时间段内超出时长(以秒为单位计算)查询条件 */
	@JsonUnwrapped(prefix = "stayedTimeTotal")
	private Condition<Long> stayedTimeTotalCondition;

	/** 时间内总计费用查询条件 */
	@JsonUnwrapped(prefix = "fee")
	private Condition<BigDecimal> feeCondition;

	/** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public StatisticsTotalQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public StatisticsTotalQuery(StatisticsTotalEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public StatisticsTotalQuery(StatisticsTotalQuery other) {
		super(other);
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.parkingNameCondition != null) {
			this.parkingNameCondition = other.parkingNameCondition.copy();
		}
		if(other.parkingIdCondition != null) {
			this.parkingIdCondition = other.parkingIdCondition.copy();
		}
		if(other.beginTimeCondition != null) {
			this.beginTimeCondition = other.beginTimeCondition.copy();
		}
		if(other.endTimeCondition != null) {
			this.endTimeCondition = other.endTimeCondition.copy();
		}
		if(other.occupyNumberCondition != null) {
			this.occupyNumberCondition = other.occupyNumberCondition.copy();
		}
		if(other.totalNumberCondition != null) {
			this.totalNumberCondition = other.totalNumberCondition.copy();
		}
		if(other.chargeNumberCondition != null) {
			this.chargeNumberCondition = other.chargeNumberCondition.copy();
		}
		if(other.stayedTimeTotalCondition != null) {
			this.stayedTimeTotalCondition = other.stayedTimeTotalCondition.copy();
		}
		if(other.feeCondition != null) {
			this.feeCondition = other.feeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<StatisticsTotalEntity> toQueryWrapper() {
		QueryWrapper<StatisticsTotalEntity> wrapper = new QueryWrapper<>(this);
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (parkingNameCondition != null) {
			parkingNameCondition.toWrapper(wrapper, COL_PARKING_NAME);
		}
		if (parkingIdCondition != null) {
			parkingIdCondition.toWrapper(wrapper, COL_PARKING_ID);
		}
		if (beginTimeCondition != null) {
			beginTimeCondition.toWrapper(wrapper, COL_BEGIN_TIME);
		}
		if (endTimeCondition != null) {
			endTimeCondition.toWrapper(wrapper, COL_END_TIME);
		}
		if (occupyNumberCondition != null) {
			occupyNumberCondition.toWrapper(wrapper, COL_OCCUPY_NUMBER);
		}
		if (totalNumberCondition != null) {
			totalNumberCondition.toWrapper(wrapper, COL_TOTAL_NUMBER);
		}
		if (chargeNumberCondition != null) {
			chargeNumberCondition.toWrapper(wrapper, COL_CHARGE_NUMBER);
		}
		if (stayedTimeTotalCondition != null) {
			stayedTimeTotalCondition.toWrapper(wrapper, COL_STAYED_TIME_TOTAL);
		}
		if (feeCondition != null) {
			feeCondition.toWrapper(wrapper, COL_FEE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 *
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}

	/**
	 * 获取商圈ID查询条件
	 *
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 *
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回商户id查询条件
	 *
	 * @return merchantIdCondition 商户id查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}

	/**
	 * 获取商户id查询条件
	 *
	 * @return merchantIdCondition 商户id查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户id查询条件
	 *
	 * @param merchantIdCondition 商户id查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回停车场名称查询条件
	 *
	 * @return parkingNameCondition 停车场名称查询条件
	 */
	public Condition<String> parkingName() {
		this.parkingNameCondition = new Condition<>();
		return this.parkingNameCondition;
	}

	/**
	 * 获取停车场名称查询条件
	 *
	 * @return parkingNameCondition 停车场名称查询条件
	 */
	public Condition<String> getParkingNameCondition() {
		return parkingNameCondition;
	}

	/**
	 * 设置停车场名称查询条件
	 *
	 * @param parkingNameCondition 停车场名称查询条件
	 */
	public void setParkingNameCondition(Condition<String> parkingNameCondition) {
		this.parkingNameCondition = parkingNameCondition;
	}

	/**
	 * 构造并返回停车场ID查询条件
	 *
	 * @return parkingIdCondition 停车场ID查询条件
	 */
	public Condition<String> parkingId() {
		this.parkingIdCondition = new Condition<>();
		return this.parkingIdCondition;
	}

	/**
	 * 获取停车场ID查询条件
	 *
	 * @return parkingIdCondition 停车场ID查询条件
	 */
	public Condition<String> getParkingIdCondition() {
		return parkingIdCondition;
	}

	/**
	 * 设置停车场ID查询条件
	 *
	 * @param parkingIdCondition 停车场ID查询条件
	 */
	public void setParkingIdCondition(Condition<String> parkingIdCondition) {
		this.parkingIdCondition = parkingIdCondition;
	}

	/**
	 * 构造并返回计算开始时间查询条件
	 *
	 * @return beginTimeCondition 计算开始时间查询条件
	 */
	public Condition<LocalDateTime> beginTime() {
		this.beginTimeCondition = new Condition<>();
		return this.beginTimeCondition;
	}

	/**
	 * 获取计算开始时间查询条件
	 *
	 * @return beginTimeCondition 计算开始时间查询条件
	 */
	public Condition<LocalDateTime> getBeginTimeCondition() {
		return beginTimeCondition;
	}

	/**
	 * 设置计算开始时间查询条件
	 *
	 * @param beginTimeCondition 计算开始时间查询条件
	 */
	public void setBeginTimeCondition(Condition<LocalDateTime> beginTimeCondition) {
		this.beginTimeCondition = beginTimeCondition;
	}

	/**
	 * 构造并返回计算终止时间查询条件
	 *
	 * @return endTimeCondition 计算终止时间查询条件
	 */
	public Condition<LocalDateTime> endTime() {
		this.endTimeCondition = new Condition<>();
		return this.endTimeCondition;
	}

	/**
	 * 获取计算终止时间查询条件
	 *
	 * @return endTimeCondition 计算终止时间查询条件
	 */
	public Condition<LocalDateTime> getEndTimeCondition() {
		return endTimeCondition;
	}

	/**
	 * 设置计算终止时间查询条件
	 *
	 * @param endTimeCondition 计算终止时间查询条件
	 */
	public void setEndTimeCondition(Condition<LocalDateTime> endTimeCondition) {
		this.endTimeCondition = endTimeCondition;
	}

	/**
	 * 构造并返回本时间段结束后还占车位数量查询条件
	 *
	 * @return occupyNumberCondition 本时间段结束后还占车位数量查询条件
	 */
	public Condition<Integer> occupyNumber() {
		this.occupyNumberCondition = new Condition<>();
		return this.occupyNumberCondition;
	}

	/**
	 * 获取本时间段结束后还占车位数量查询条件
	 *
	 * @return occupyNumberCondition 本时间段结束后还占车位数量查询条件
	 */
	public Condition<Integer> getOccupyNumberCondition() {
		return occupyNumberCondition;
	}

	/**
	 * 设置本时间段结束后还占车位数量查询条件
	 *
	 * @param occupyNumberCondition 本时间段结束后还占车位数量查询条件
	 */
	public void setOccupyNumberCondition(Condition<Integer> occupyNumberCondition) {
		this.occupyNumberCondition = occupyNumberCondition;
	}

	/**
	 * 构造并返回时间段内停车总数量查询条件
	 *
	 * @return totalNumberCondition 时间段内停车总数量查询条件
	 */
	public Condition<Integer> totalNumber() {
		this.totalNumberCondition = new Condition<>();
		return this.totalNumberCondition;
	}

	/**
	 * 获取时间段内停车总数量查询条件
	 *
	 * @return totalNumberCondition 时间段内停车总数量查询条件
	 */
	public Condition<Integer> getTotalNumberCondition() {
		return totalNumberCondition;
	}

	/**
	 * 设置时间段内停车总数量查询条件
	 *
	 * @param totalNumberCondition 时间段内停车总数量查询条件
	 */
	public void setTotalNumberCondition(Condition<Integer> totalNumberCondition) {
		this.totalNumberCondition = totalNumberCondition;
	}

	/**
	 * 构造并返回时间段内超出免费数量查询条件
	 *
	 * @return chargeNumberCondition 时间段内超出免费数量查询条件
	 */
	public Condition<Integer> chargeNumber() {
		this.chargeNumberCondition = new Condition<>();
		return this.chargeNumberCondition;
	}

	/**
	 * 获取时间段内超出免费数量查询条件
	 *
	 * @return chargeNumberCondition 时间段内超出免费数量查询条件
	 */
	public Condition<Integer> getChargeNumberCondition() {
		return chargeNumberCondition;
	}

	/**
	 * 设置时间段内超出免费数量查询条件
	 *
	 * @param chargeNumberCondition 时间段内超出免费数量查询条件
	 */
	public void setChargeNumberCondition(Condition<Integer> chargeNumberCondition) {
		this.chargeNumberCondition = chargeNumberCondition;
	}

	/**
	 * 构造并返回时间段内超出时长(以秒为单位计算)查询条件
	 *
	 * @return stayedTimeTotalCondition 时间段内超出时长(以秒为单位计算)查询条件
	 */
	public Condition<Long> stayedTimeTotal() {
		this.stayedTimeTotalCondition = new Condition<>();
		return this.stayedTimeTotalCondition;
	}

	/**
	 * 获取时间段内超出时长(以秒为单位计算)查询条件
	 *
	 * @return stayedTimeTotalCondition 时间段内超出时长(以秒为单位计算)查询条件
	 */
	public Condition<Long> getStayedTimeTotalCondition() {
		return stayedTimeTotalCondition;
	}

	/**
	 * 设置时间段内超出时长(以秒为单位计算)查询条件
	 *
	 * @param stayedTimeTotalCondition 时间段内超出时长(以秒为单位计算)查询条件
	 */
	public void setStayedTimeTotalCondition(Condition<Long> stayedTimeTotalCondition) {
		this.stayedTimeTotalCondition = stayedTimeTotalCondition;
	}

	/**
	 * 构造并返回时间内总计费用查询条件
	 *
	 * @return feeCondition 时间内总计费用查询条件
	 */
	public Condition<BigDecimal> fee() {
		this.feeCondition = new Condition<>();
		return this.feeCondition;
	}

	/**
	 * 获取时间内总计费用查询条件
	 *
	 * @return feeCondition 时间内总计费用查询条件
	 */
	public Condition<BigDecimal> getFeeCondition() {
		return feeCondition;
	}

	/**
	 * 设置时间内总计费用查询条件
	 *
	 * @param feeCondition 时间内总计费用查询条件
	 */
	public void setFeeCondition(Condition<BigDecimal> feeCondition) {
		this.feeCondition = feeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}

	/**
	 * 获取创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 *
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
